package io.plus.user_interface.io.common.packet.login;

import io.plus.user_interface.io.common.Status;
import io.plus.user_interface.io.common.packet.Command;
import io.plus.user_interface.io.common.packet.ResponseMessage;
import io.plus.user_interface.io.common.packet.User;
import lombok.Data;

@Data
public class LoginResponseMessage extends ResponseMessage {

    private static final long serialVersionUID = 1L;

    private String token;
    private User user;

    public LoginResponseMessage(Command command, Status status) {
        this(command, status, null);
    }

    public LoginResponseMessage(Command command, Status status, User user) {
        super(command, status);
        this.user = user;
    }

    @Override
    public void clear() {
        setToken(null);
        setUser(null);
    }
}
